package com.taocyb.commons.uc.entity;

import java.io.Serializable;
import java.util.Date;

import com.taocyb.constant.uc.UserStatus;

/**
 * 用户
 */
public class User implements Serializable {
	private static final long serialVersionUID = -2198529259258698094L;

	private Long id; 			// 主键ID
	private String loginName; 	// 登陆账号
	private String password; 	// 登陆密码
	private String nickName; 	// 用户昵称
	private Integer status; 	// 用户状态
	private String registerIp; 	// 注册IP
	private String recommender; // 推荐人
	private String salt;		// 加密盐值
	private Date createTime; 	// 创建时间
	private Date updateTime; 	// 修改时间
	
	private transient UserStatus userStatus; 	//用户状态枚举
	private transient UserDetail userDetail;	//用户详情		

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
		this.userStatus = UserStatus.getEnum(status);
	}

	public String getRegisterIp() {
		return registerIp;
	}

	public void setRegisterIp(String registerIp) {
		this.registerIp = registerIp;
	}

	public String getRecommender() {
		return recommender;
	}

	public void setRecommender(String recommender) {
		this.recommender = recommender;
	}
	
	public String getSalt() {
		return salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public UserStatus getUserStatus() {
		return userStatus;
	}

	public UserDetail getUserDetail() {
		return userDetail;
	}

	public void setUserDetail(UserDetail userDetail) {
		this.userDetail = userDetail;
	}
}
